put "10,11" into buttonList -- id #s of radio buttons
repeat with x = 1 to the number of items of buttonList
set hilite of button id (item x of buttonList) to false
end repeat
set hilite of the target to true
end radioRL
on setParameters
global rotIncrement5,timeIncrement5
global puckIncX,puckIncY
global trace5
put 140 into radius
put card field "Time Increment" into timeIncrement5
put (card field "Angular Velocity" * (pi/180)) into angVelRad
put angVelRad*timeIncrement5 into rotIncrement5
put (radius*angVelRad) into tanVelocity
put card field "Puck Speed" into puckSpeed
if hilite of button "Right of Center" is true then
put (card field "Puck Angle"*(pi/180)) into puckAngle
else put -(card field "Puck Angle"*(pi/180)) into puckAngle
put -(puckSpeed*cos(puckAngle))*timeIncrement5 into puckIncY
put ((puckSpeed*sin(puckAngle))+tanVelocity)*timeincrement5 into puckIncX
put hilite of button "Trace Puck Path" into trace5
end setParameters
-- part 10 (button)
-- low flags: 00
-- high flags: C006
-- rect: left=46 top=122 right=144 bottom=165
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Left of Center
----- HyperTalk script -----
on mouseUp
radioRL
end mouseUp
-- part 11 (button)
-- low flags: 00
-- high flags: 8006
-- rect: left=165 top=122 right=144 bottom=296
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Right of Center
----- HyperTalk script -----
on mouseUp
radioRL
end mouseUp
-- part 2 (field)
-- low flags: 02
-- high flags: 0002
-- rect: left=272 top=65 right=82 bottom=312
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Angular Velocity
-- part 4 (field)
-- low flags: 02
-- high flags: 0002
-- rect: left=272 top=85 right=102 bottom=312
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Puck Speed
-- part 5 (field)
-- low flags: 02
-- high flags: 0002
-- rect: left=272 top=105 right=122 bottom=312
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Puck Angle
----- HyperTalk script -----
on closeField
get me
if it > 90 or it < 0 then
answer "That value must be between 0 and 90."
select line 1 of me
end if
end closefield
-- part 7 (field)
-- low flags: 02
-- high flags: 0002
-- rect: left=272 top=144 right=161 bottom=313
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Time Increment
-- part 16 (button)
-- low flags: 00
-- high flags: C005
-- rect: left=46 top=165 right=187 bottom=173
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Trace Puck Path
----- HyperTalk script -----
on mouseUp
setCheckBox
end mouseUp
-- part 19 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=11 top=40 right=326 bottom=403
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: Help
-- part contents for background part 6
----- text -----
Changing values in the top half alters the path of the puck.
-- part contents for card part 2
----- text -----
90
-- part contents for card part 7
----- text -----
.01
-- part contents for card part 5
----- text -----
57.4
-- part contents for card part 4
----- text -----
259.92
-- part contents for card part 19
----- text -----
The parameters below the gray bar are constants provided for your benefit. They may not be changed without altering the calculation scripts attached to the card.
The parameters listed above the bar are variable. To change any of them, drag across the box holding the value and type the new value. Pressing <return> will automatically select the value in the next field.
Any change in the controlled parameters will be reflected as a change in the outcome of the experiment. Feel free to play around.